package tests;

import static org.junit.Assert.*;

import info.Conference;
import java.util.Date;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
import users.ProgramChair;
import users.SubprogramChair;
import users.User;

/**
 * Junit test for the SubprogramChiar class. 
 * @author Lun-Wei Chang
 * @version 3/19/2014
 */
public class SubprogramChairTest {
  
  /** The ID that this role is represented by. */
  public static final long ROLE_ID = 2;

  /** The Program Chair that the Subprogram Chair responds to. */
  private long my_program_chair;

  /** The categories of the conference that the Subprogram Chair
   * is assigned to specialize in. */
  private List<String> my_categories;

  /** The list of reviewers that are responsible to the Subprogram
   * Chair. */
  private List<Long> my_reviewers;

  /** The list of manuscripts that the Subprogram Chair is responsible
   * for reviewing. */
  private List<Long> my_manuscripts;
  
  /** The role id for the SubprogramChair. */
  private long my_role_id;
  
  /** The role name for the SubprogramChair. */
  private String my_role_name;

  /** 
   * Constructs a new SubprogramChair data object.
   * @throws Exception throws an exception if constructions failed. 
   */
  @SuppressWarnings("deprecation")
  @Before
  public void setUp() throws Exception {
    final User person = new User("David", "Chang", "aspirine539@gmail.com");
    final Conference meeting = new Conference(1, "", "", new Date(2014, 03, 31));
    
    final ProgramChair pc = new ProgramChair(ROLE_ID, person, meeting);
    final SubprogramChair spc = new SubprogramChair(person, meeting, pc);
    my_program_chair = spc.getProgramChair();
    my_categories = spc.getCategories();
    my_reviewers = spc.getReviewers();
    my_manuscripts = spc.getManuscripts();
    my_role_id = spc.getRoleID();
    my_role_name = spc.getRoleName();
  }
  
  /** Tests the assignReviewerRole method. */
  @Test
  public void assignReviewerRole() {
  }

  /** Tests the assignManuscriptToReviewer method. */
  @Test
  public void assignManuscriptToReviewer() {
  }

  /** Tests the assignManuscript method. */
  @Test
  public void assignManuscript() {
  }

  /** Tests the getProgramChair method. */
  @Test
  public void getProgramChair() {
    assertNotNull("Empty long program chair!", my_program_chair);
  }

  /** Tests the getCategories method. */
  @Test
  public void getCategories() {
    assertNotNull("Empty list of categories!", my_categories);
  }

  /** Tests the getReviewers method. */
  @Test
  public void getReviewers() {
    assertNotNull("", my_reviewers);
  }

  /** Tests the getManuscripts method. */
  @Test
  public void getManuscripts() {
    assertNotNull("", my_manuscripts);
  }

  /** Tests the getRoleID method. */
  @Test
  public void getRoleID() {
    assertNotNull("Empty role id!", my_role_id);
    assertEquals("Incorrect role id!", ROLE_ID, my_role_id);
  }

  /** Tests the getRoleName method. */
  @Test
  public void getRoleName() {
    assertNotNull("Empty role name!", my_role_name);
  }
  
}
